# Author 阳某
names = "my \tname is jack,i am {year} old , i like {her}"
print(names.capitalize())#首字母大写
print(names.count("a"))#a有多少个
print(names.center(50,"*"))#50个字符，不够用*补齐，，names居中
print(names.endswith("ck"))#判断是否以什么结尾
print(names.expandtabs(tabsize=30))#将tab健转换成30个空格
print(names.find("name"))#位置是4，，字符串也可以切片
print(names[names.find("name"):9])#将name取出
print(names.format(year = "33",her = "fangfang"))
print(names.format_map({'year':'20','her':'shagua'}))
print('ab12'.isalnum)#只能有英文和数字
print('ab12A'.isalpha())#是否为纯英文
print('2A'.isdecimal())#是否为十进制
print('2A'.isdigit())#是否为整数
print('2A'.isidentifier())#是否为合法的标识符
print('2A'.islower())#是否为小写
print('2A'.isnumeric())#是否为只有数字
print('2A'.isspace())#是否为空格
print('My Name Is'.isspace())#是否为标题，每个首字母大写
print('My Name Is'.isprintable())#是否为可打印的，tty file , drive file
print('My Name Is'.isupper())#是否为大写
print('+'.join(['1','2','3','4']))
print(names.ljust(50,'*'))#50个字符，不够末尾补*
print(names.rjust(50,'-'))
print('ABCs'.lower())
print('ABCsaa'.upper())
print('\nABCsaa'.lstrip())#从左边去空格后回车
print('\nABCsaa\n'.rstrip())#从右边去空格后回车
print('      ABCsaa\n'.strip())#从两边去空格后回车
p = str.maketrans('ouyangsi','123@#$%5')
print("like you".translate(p))
print("abca a".replace("a","A",2))#2代表个数
print("alex li l".rfind('l'))
print("al ex li l".split(' '))
print("1+2+3+4".split('+'))
print("1+2\n+3+4".splitlines())
print("My name".swapcase())#小写变大写，大写变小写
print("my name".title())
print("my name".zfill(50))#往前补0










